package com.subl.mybatis.config;

import com.zaxxer.hikari.HikariDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Map;


/**
 * @author siyong
 * @date 2018/11/22 13:57
 * create by siyong
 */
@ConfigurationProperties(prefix = "spring.datasource.hikari")
public class MybatisProperties {
    private Map<String, HikariDataSource> dataSourceMap;
    private Long workerId;
    private Long dataCenterId;
    private Boolean showLog;
    private String mapperLocations;
    private Boolean enableBatch = Boolean.FALSE;

    public Map<String, HikariDataSource> getDataSourceMap() {
        return dataSourceMap;
    }

    public void setDataSourceMap(Map<String, HikariDataSource> dataSourceMap) {
        this.dataSourceMap = dataSourceMap;
    }

    public Long getWorkerId() {
        return workerId;
    }

    public void setWorkerId(Long workerId) {
        this.workerId = workerId;
    }

    public Long getDataCenterId() {
        return dataCenterId;
    }

    public void setDataCenterId(Long dataCenterId) {
        this.dataCenterId = dataCenterId;
    }

    public Boolean getShowLog() {
        return showLog;
    }

    public void setShowLog(Boolean showLog) {
        this.showLog = showLog;
    }

    public String getMapperLocations() {
        return mapperLocations;
    }

    public void setMapperLocations(String mapperLocations) {
        this.mapperLocations = mapperLocations;
    }

    public Boolean getEnableBatch() {
        return enableBatch;
    }

    public void setEnableBatch(Boolean enableBatch) {
        this.enableBatch = enableBatch;
    }
}
